package com.ecarx.camera.ui.dialog;

import android.view.View;
import android.widget.FrameLayout;

import androidx.annotation.NonNull;

import com.ecarx.camera.R;
import com.ecarx.camera.ui.BaseDialog;

public class CustomDialog extends BaseDialog {

    public FrameLayout layoutCustomViewContainer;
    private View customView;

    public static CustomDialog newInstance() {
        CustomDialog customDialog = new CustomDialog();
        return customDialog;
    }

    @Override
    protected int getLayoutResId() {
        return R.layout.dialog_custom;
    }

    @Override
    protected void initData() {
        super.initData();
    }

    @Override
    protected void bindViews() {
        super.bindViews();
        layoutCustomViewContainer = layoutRoot.findViewById(R.id.layout_custom_view_container);
        layoutCustomViewContainer.addView(customView, FrameLayout.LayoutParams.MATCH_PARENT, FrameLayout.LayoutParams.MATCH_PARENT);
    }

    @Override
    protected void initViews() {
        super.initViews();
    }

    public CustomDialog setCustomView(@NonNull View customView) {
        this.customView = customView;
        return this;
    }
}
